package org.come.Jpanel;

import com.tool.btn.QLYFindBtn;
import com.tool.tcpimg.UIUtils;
import org.come.until.FormsManagement;

import javax.swing.*;
import java.awt.*;
import java.math.BigDecimal;



public class QLYJpanel extends JPanel {

    private QLYFindBtn codeBtn1,// 确定按钮
            codeBtn2;// 取消按钮
    private JTextField textCode;// 输入兑奖码
    private JLabel titleJLabel;

    public QLYJpanel() {
        this.setPreferredSize(new Dimension(534, 145));
        this.setLayout(null);
        this.setBackground(UIUtils.Color_BACK);

        // 输入兑换码
        textCode = new JTextField();
        textCode.setBounds(28, 89, 475, 15);
        textCode.setFont(UIUtils.TEXT_FONT1);
        textCode.setOpaque(false);
        textCode.setBorder(BorderFactory.createEmptyBorder());
        textCode.setCaretColor(Color.white);
        textCode.setForeground(Color.white);
        this.add(textCode);

        // 确定按钮
        codeBtn1 = new QLYFindBtn("skin/8100226/newbutton/B20.png",  1, "查询", this,null);
        codeBtn1.setBounds(150, 112, 59, 24);
        this.add(codeBtn1);
        // 取消按钮
        codeBtn2 = new QLYFindBtn("skin/8100226/newbutton/B20.png",  1, "取消", this,null);
        codeBtn2.setBounds(300, 112, 59, 24);
        this.add(codeBtn2);
//        // 标题
//        titleJLabel = new JLabel("请输入要查询角色的id");
//        titleJLabel.setForeground(Color.YELLOW);
//        titleJLabel.setFont(UIUtils.TEXT_FONT);
//        titleJLabel.setVerticalTextPosition(SwingConstants.CENTER);
//        titleJLabel.setBounds(20, 10, 134, 20);
//        this.add(titleJLabel);

        titleJLabel = new JLabel();
        titleJLabel.setForeground(Color.YELLOW);
        titleJLabel.setFont(UIUtils.TEXT_FONT);
        titleJLabel.setVerticalTextPosition(SwingConstants.CENTER);
        titleJLabel.setBounds(200, 10, 134, 20);
        this.add(titleJLabel);

    }

    private BigDecimal rgid;


    String xz2 = "查询需要支付10万，可以查询到精确所在位置";
    String xz3 = "输入查询的ID:";
    private ImageIcon icon;

    @Override
    protected void paintComponent(Graphics g) {

        super.paintComponent(g);
        if (icon == null) {
                icon = new ImageIcon("inkImg/newbackground/B235.png");
        }

        g.drawImage(icon.getImage(), 0, 0, 534, 145, this);

        g.setFont(UIUtils.TEXT_FONT1);
        g.setColor(Color.YELLOW);
        g.drawString(xz2, 24, 40);
        g.setFont(UIUtils.TEXT_FONT);
        g.setColor(Color.WHITE);
        g.drawString(xz3, 24, 78);


    }

    public JTextField getTextCode() {
        return textCode;
    }

    public void setTextCode(JTextField textCode) {
        this.textCode = textCode;
    }

    public BigDecimal getRgid() {
        return rgid;
    }

    public void setRgid(BigDecimal rgid) {
        this.rgid = rgid;
    }

}
